package com.jt.controller;

import com.jt.pojo.Item;
import com.jt.vo.EasyUITable;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jt.service.ItemService;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController  //返回值数据都是json字符串
@RequestMapping("/item/")
public class ItemController {
	
	@Autowired
	private ItemService itemService;
	@RequestMapping("query")
	public EasyUITable findItemPage(Integer page,Integer rows){
//		List<Item> lists = itemService.findItemByPage(page,rows);
//		Long records = itemService.findRecords();
//		return new EasyUITable(records,lists);
		return itemService.findItemByPage(page,rows);
	}
	
	
	
}
